import { http } from '@/common/https.js'

// 入库预约列表
export const inplanListApi = (data) => {
  return http({
    url: '/logistics/inplan/list',
    method: 'get',
    data,
    custid: true
  })
}

// 删除入库预约
export const inplanDeleteApi = (id) => {
  return http({
    url: `/logistics/inplan/${id}`,
    method: 'delete'
  })
}

// 入库计划商品列表
export const inplanGoodsListApi = (data) => {
  return http({
    url: '/logistics/ingoods/list',
    method: 'get',
    data,
  })
}
// 删除入库计划商品
export const inplanGoodsDeleteApi = (id) => {
  return http({
    url: `/logistics/ingoods/${id}`,
    method: 'delete'
  })
}
// 获取入库计划商品详情
export const inplanGoodsDetailApi = (id) => {
  return http({
    url: `/logistics/ingoods/${id}`,
    method: 'get'
  })
}

// 入库计划发货 
export const inplanSendApi = (data) => {
  return http({
    url: '/logistics/inplan/sendGoods',
    method: 'post',
    data
  })
}
// 
export const inorderoperlogApi = (data) => {
  return http({
    url: '/logistics/inorderoperlog',
    method: 'post',
    data
  })
}

// 获取出库列表
export const outplanListApi = (data) => {
  return http({
    url: '/logistics/outplan/list',
    method: 'get',
    data,
    custid: true
  })
}
// 删除出库列表
export const outplanDeleteApi = (id) => {
  return http({
    url: `/logistics/outplan/${id}`,
    method: 'delete'
  })
}
// 出库计划商品列表
export const outplanGoodsListApi = (data) => {
  return http({
    url: '/logistics/outgoods/list',
    method: 'get',
    data,
  })
}
// 删除出库计划商品
export const outplanGoodsDeleteApi = (id) => {
  return http({
    url: `/logistics/outgoods/${id}`,
    method: 'delete'
  })
}
// 获取出库计划商品详情
export const outplanGoodsDetailApi = (id) => {
  return http({
    url: `/logistics/outgoods/${id}`,
    method: 'get'
  })
}

// 出库计划备货
export const outplanSendApi = (data) => {
  return http({
    url: '/logistics/outplan/pickupGoods',
    method: 'post',
    data
  })
}

// 入库预约车辆到达确认
export const inplanArriveApi = (data) => {
  return http({
    url: '/logistics/inplan/carEnter',
    method: 'post',
    data
  })
}

// 出库预约车辆到达确认
export const outplanArriveApi = (data) => {
  return http({
    url: '/logistics/outplan/carEnter',
    method: 'post',
    data
  })
}